﻿function ClientDoSimpleSearch(belongSite)
{             var Keyword;
    Keyword = document.getElementById("txtSearchKeyword").value;
              Url = SODC.CMPortal.Search.FSearchWP.GetResultSearchUrl(belongSite, Keyword).value;
              if (Url.indexOf("ERROR")!=-1) 
              { 
                 alert(Url); 
                return; 
              } 
              window.open(Url,"_self"); 
}

function ClientDoSimpleSearch1(belongSite) {
    var Keyword;
    Keyword = document.getElementById("txtSearchKeyword1").value;
    Url = SODC.CMPortal.Search.FResultSearch.GetResultSearchUrl(belongSite, Keyword).value;
    if (Url.indexOf("ERROR") != -1) {
        alert(Url);
        return;
    }
    window.open(Url, "_self");
}  


function KeyPressForSearch(myfield,e,belongSite) 
            {  
               var keycode; 
            if (myfield.event) keycode = myfield.event.keyCode; 
                    else if (e) keycode = e.which; 
                       else return true; 
             if (keycode == 13) 
              {
                  Keyword = document.getElementById("txtSearchKeyword").value;
                  ClientDoSimpleSearch(belongSite); 
                 return false; 
              } 
              else
             { 
                  return true; 
              } 
            }
            